<template>
	<view class="mains">
		<view class="sticky">
			<view class="my_button" :class="{'inactive':inactive}" @click="$u.throttle(confirm,1500) ">
				{{text}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			inactive: { //默认是激活，inactive=true未 浅绿色未激活
				default: false,
				required: false
			},
			text:{
				default: '确认',
				required: false
			}
		},
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {
			confirm() {
				this.$emit('confirm', this.inactive)
			}
		},
	}
</script>

<style lang="scss" scoped>
	.mains {
		.sticky {
			width: 100%;
			padding: 0 24rpx;
			position: fixed;
			//z-index: 2;
			bottom: 0;
			padding-bottom: 80rpx;
			background-color: #FFFFFF;

			.my_button {
				background-color: #4DC0D9;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 32rpx;
				color: #FFFFFF;
				line-height: 38rpx;
				text-align: center;
				padding: 20rpx 0;
				border-radius: 20rpx;
			}
		}

		.inactive {
			background-color: #A6DFEC !important;
		}

		//background-color: #F8F8F8;
	}
</style>